package elevatronic.view.right;

import elevatronic.view.ImageView;
import elevatronic.view.MPanel;
import elevatronic.view.right.brain.BrainPanel;
import elevatronic.view.right.parameter.ParameterPanel;
import elevatronic.view.right.title.TitlePanel;

public class RightPanel extends MPanel{
	private static final long serialVersionUID = 1953571243189741264L;

	public static final int PARAMETER_PANEL_POSX=20;
	public static final int PARAMETER_PANEL_POSY=571;
	public static final int PARAMETER_PANEL_WIDTH=160;
	public static final int PARAMETER_PANEL_HEIGHT=220;
	public static final int BRAIN_PANEL_POSX=20;
	public static final int BRAIN_PANEL_POSY=176;
	public static final int BRAIN_PANEL_WIDTH=160;
	public static final int BRAIN_PANEL_HEIGHT=373;
	public static final int TITLE_PANEL_POSX=20;
	public static final int TITLE_PANEL_POSY=8;
	public static final int TITLE_PANEL_WIDTH=160;
	public static final int TITLE_PANEL_HEIGHT=145;
	
	
	//the view of the parameters
	private ParameterPanel parameterPanel;
	public ParameterPanel getParameterPanel() {
		return parameterPanel;
	}
	public void setParameterPanel(ParameterPanel parameterPanel) {
		this.parameterPanel = parameterPanel;
	}
	
	//the view of the brain statistics panel
	private BrainPanel brainPanel;
	public BrainPanel getBrainPanel() {
		return brainPanel;
	}
	public void setBrainPanel(BrainPanel brainPanel) {
		this.brainPanel = brainPanel;
	}
	
	//the view of the title panel
	private TitlePanel titlePanel;
	public TitlePanel getTitlePanel() {
		return titlePanel;
	}
	public void setTitlePanel(TitlePanel titlePanel) {
		this.titlePanel = titlePanel;
	}
	
	
	/**
	 * Constructor
	 */
	public RightPanel(int wdth,int hght){
		super(wdth,hght);
	    setParameterPanel(new ParameterPanel(PARAMETER_PANEL_WIDTH,PARAMETER_PANEL_HEIGHT));
	    getParameterPanel().setLocation(PARAMETER_PANEL_POSX,PARAMETER_PANEL_POSY);
	    add(getParameterPanel());
	    
	    setBrainPanel(new BrainPanel(BRAIN_PANEL_WIDTH,BRAIN_PANEL_HEIGHT));
	    getBrainPanel().setLocation(BRAIN_PANEL_POSX,BRAIN_PANEL_POSY);
	    add(getBrainPanel());
	    
	    setTitlePanel(new TitlePanel(TITLE_PANEL_WIDTH,TITLE_PANEL_HEIGHT));
	    getTitlePanel().setLocation(TITLE_PANEL_POSX,TITLE_PANEL_POSY);
	    add(getTitlePanel());
	    
	    setImagePanel(new ImageView("rightPanel",0,0,201,800));
	}
	

	
	//iteration of the right panel
	public void update(int step){
		super.update(step);
		getParameterPanel().update(step);
		getBrainPanel().update(step);
		getTitlePanel().update(step);
	}
}
